<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spring OAuth Client Thymeleaf</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" />
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm p-3 mb-5">
        <a class="navbar-brand" th:href="@{/foos/}">Spring OAuth Client Thymeleaf</a>
        <ul class="navbar-nav ml-auto">
            <li class="navbar-text">Hi, <span sec:authentication="name">username</span>&nbsp;&nbsp;&nbsp;
            </li>
            <li class="nav-item"><a href="/oauth-client-spring/logout" class="btn btn-outline-secondary">Logout</a></li>
        </ul>
    </nav>

    <div class="container">
        <h1>Foos : Create</h1>
        <div class="alert alert-danger" role="alert" th:if="${msg}" th:text="${msg}">Error Occurred</div>

        <form th:object="${foo}" th:action="@{/foos}" method="post">
            <div class="form-group row">
                <label for="name" class="col-sm-1 col-form-label">Name</label>
                <div class="col-sm-10">
                    <input type="text" class="col-sm-6 form-control" id="name" th:field="*{name}" />
                </div>
            </div>
            <button type="submit" class="btn btn-primary">Create Foo</button>
        </form>

    </div>

</body>
</html>